package job

import (
	"fmt"
	_ "gf-start-kit/plugins/job/controller"
	"gf-start-kit/plugins/job/lib/jcron"
	"gf-start-kit/plugins/job/lib/task"
	"github.com/gogf/gf/frame/g"
)

func init() {
	bindTaskFunc()
}

//注册可使用的定时任务
func bindTaskFunc() {
	jcron.Adds(g.Slice{jcron.Entity{
		FuncName: "UrlQuery",
		Param:    "",
		Run:      task.UrlQuery,
	}, jcron.Entity{
		FuncName: "test",
		Param:    "",
		Run:      task.Test,
	}})
	fmt.Println("bindTaskFunc success")
}
